<?php

class Account {
	private $id;

	public function getId() {
		return $this->id;
	}

	public function setId($id) {
		$this->id = $id;
	}

	public function __construct($type = null, $category = null, $date = null, $amount = null, $tag = null, $description = null, $detail = null) {
		$this->type = $type;
		$this->category = $category;
		$this->date = $date;
		$this->amount = $amount;
		$this->tag = $tag;
		$this->description = $description;
		$this->detail = $detail;
	}

	private $type;

	private $category;
	private $date;
	private $amount;
	private $tag;
	private $description;
	private $detail;

	public function getType() {
		return $this->type;
	}

	public function setType($type) {
		$this->type = $type;
	}
	public function getDate() {
		return $this->date;
	}

	public function setDate($date) {
		$this->date = $date;
	}
	public function getAmount() {
		return $this->amount;
	}

	public function setAmount($amount) {
		$this->amount = $amount;
	}
	public function getTag() {
		return $this->tag;
	}

	public function setTag($tag) {
		$this->tag = $tag;
	}
	public function getDescription() {
		return $this->description;
	}

	public function setDescription($description) {
		$this->description = $description;
	}
	public function getDetail() {
		return $this->detail;
	}

	public function setDetail($detail) {
		$this->detail = $detail;
	}
	public function getCategory() {
		return $this->category;
	}

	public function setCategory($category) {
		$this->category = $category;
	}
	
	public function toJSON() {
		$json = array (
			"id" => $this->id,
			"category" => $this->category,
			"date" => $this->date,
			"amount" => $this->amount,
			"description" => $this->description,
			"type" => $this->type
		);
		
		return $json;
	}
}

?>